#include <iostream>

using namespace std;

int main()
{
    int n,a;
    cin >> n ;

    do{
        a = n%10;
        cout << a;
        n = n/10;
    }
    while(n!=0); //do里面为循环体，while里面为循环表达式

    //cout << endl;
    return 0;
}
